/**
 * @author 黄波
 * 创建日期：2011Sep 4, 2011
 * TODO// N/A
 */
package com.platform.manager.bo;

import java.util.List;

import com.platform.dao.BaseDao;
import com.platform.pojo.GroupPower;
import com.platform.pojo.Power;

public class UserGroupPowerBo {

	/**
	 * 添加一个用户组权限
	 * @param groupPower
	 * @return
	 */
	public boolean addUserGroupPower(GroupPower groupPower) {
		return BaseDao.add(groupPower);
	}

	/**
	 * 根据用户组ID,查询该用户组的权限
	 * @param groupId
	 * @return
	 */
	public List<GroupPower> getPowers(String groupId) {
		String hql = "from GroupPower where groupId=" + groupId;
		return BaseDao.getList(hql);
	}
	
	/**
	 * 删除一个用户权限对应关系
	 * @param obj
	 * @return
	 */
	public boolean deleteGroupPower(GroupPower obj) {
		return BaseDao.delete(obj);
	}
}
